package com.shopping.mall.core.module.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shopping.mall.core.module.user.entity.Role;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.annotation.PostConstruct;

/**
 * Admin实体类
 *
 * @author zzy
 * @date 2021-08-09
 */
@Data
@TableName("admin")
public class Admin {

    public interface insert {
    }

    public interface update {
    }

    @ApiModelProperty(value = "管理员id")
    @TableId(type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "管理员用户名")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "等级(1超级管理员,2普通管理员)")
    private Integer level;

    @ApiModelProperty(value = "账号状态(0封禁,1正常)")
    private Integer state;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String mail;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "1男2女")
    private Integer gender;

    @ApiModelProperty(value = "头像")
    private String photo;

    @TableField(exist = false)
    private AdminLevel adminLevel;

    @TableField(exist = false)
    private String languageId;

}
